#include <iostream>
#include <string>
#include <sstream>

using namespace std;

int numbers = 0;

int main()
{
    string input;
    cin >> input;
    getline(cin, input);

    stringstream ss(input);
    string word;
    int wordcount = 0;
    while (ss >> word) {
        wordcount++;
    }

    for (int i = 0; i < wordcount; i++)
    {
        if (input == "zero") {
            numbers = 0;
        }
        if (input == "one") {
            numbers = 1;
        }
        if (input == "two") {
            numbers = 2;
        }
        if (input == "three") {
            numbers = 3;
        }
        if (input == "four") {
            numbers = 4;
        }
        if (input == "five") {
            numbers = 5;
        }
        if (input == "six") {
            numbers = 6;
        }
        if (input == "seven") {
            numbers = 7;
        }
        if (input == "eight") {
            numbers = 8;
        }
        if (input == "nine") {
            numbers = 9;
        }
        cout << numbers << endl;
    }
}